package com.xt.itheima.d3_interface_demo;

import java.util.ArrayList;

public class ClassManager {
    private ArrayList<Student> students = new ArrayList<>();
    private StudentOperator studentOperator = new StudentOperatorImpl_2();

    public ClassManager() {
        students.add(new Student(12, '女', "地理热巴"));
        students.add(new Student(20, '女', "玛卡巴卡"));
        students.add(new Student(80, '男', "马尔咋哈"));
    }

    // 打印全班全部学生的信息
    public void printInfo(){
        studentOperator.printAllInfo(students);
    }

    // 打印全班全部学生的平均分
    public void printScore(){
        studentOperator.printAverageScore(students);
    }
}
